<template>
	<div class="short-list-box">
		<ul class="short-navul">
			<li class="short-navitem" :class="{shnavitemactive: islongactivea}" @click="parorderListshort(700)">全部</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive1}" @click="parorderListshort(1)">待确认</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive2}" @click="parorderListshort(2)">待支付</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive3}" @click="parorderListshort(3)">待入住</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive4}" @click="parorderListshort(4)">入住中</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive5}" @click="parorderListshort(5)">待评价</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive6}" @click="parorderListshort(6)">已完成</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive7}" @click="parorderListshort(600)">已退房</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive8}" @click="parorderListshort(401)">已取消</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive9}" @click="parorderListshort(404)">已拒绝</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive0}" @click="parorderListshort(400)">已失效</li>
			<li class="short-navitem" :class="{shnavitemactive: islongactive80}" @click="parorderListshort(800)">已冻结</li>
		</ul>
	</div>
</template>

<script>
	import eventBus from "../assets/libs/eventBus.js";
	export default {
		name: "OrderNavs",
		data() {
			return {
				islongactivea: true,
				islongactive1: false,
				islongactive2: false,
				islongactive3: false,
				islongactive4: false,
				islongactive5: false,
				islongactive6: false,
				islongactive7: false,
				islongactive8: false,
				islongactive9: false,
				islongactive0: false,
				islongactive80:false,
				page:0
			}
		},
		methods: {
			parorderListshort(order_type) {
				var that = this;
				eventBus.$emit('order_type', order_type);
				if(order_type == 700) {
					that.islongactivea=true;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 1) {
					that.islongactivea=false;
					that.islongactive1=true;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 2) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=true;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 3) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=true;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 4) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=true;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 5) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=true;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 6) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=true;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 600) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=true;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 401) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=true;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 404) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=true;
					that.islongactive0=false;
					that.islongactive80=false;
				}
				if(order_type == 400) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=true;
					that.islongactive80=false;
				}
				if(order_type == 800) {
					that.islongactivea=false;
					that.islongactive1=false;
					that.islongactive2=false;
					that.islongactive3=false;
					that.islongactive4=false;
					that.islongactive5=false;
					that.islongactive6=false;
					that.islongactive7=false;
					that.islongactive8=false;
					that.islongactive9=false;
					that.islongactive0=false;
					that.islongactive80=true;
				}
				that.$parent.orderListshortdata=[];
				that.$emit('orderListshort',order_type,that.page);
			}
		}
	}
</script>

<style scoped>
	.short-list-box {
		width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
	}
	
	.short-navul {
		display: flex;
		width: 200%;
	}
	
	.short-navitem {
		width: 1.4rem;
		text-align: center;
		line-height: .69rem;
		background: #fff;
	}
	
	.shnavitemactive {
		color: #e25051;
		border-bottom: 2px solid #e25051;
		box-sizing: border-box;
	}
	
	::-webkit-scrollbar {
		width: 0;
		height: 0;
	}
</style>